package main

import "leetcode/tree/common"

func isMirrorTree(p *common.TreeNode, q *common.TreeNode) bool {
	if p == nil && q == nil {
		return true
	}
	if p == nil && q != nil || q == nil && p != nil {
		return false
	}
	if p.Val != q.Val {
		return false
	}
	return isMirrorTree(p.Left, q.Right) && isMirrorTree(p.Right, q.Left)
}

func main() {}
